package com.imooc.searchcountdown;

import java.util.ArrayList;
import java.util.List;

/**
 * 传统串行方式
 * @author ChangLiang
 * @date 2019/3/5
 */
public class App {

    public static void main(String[] args) throws InterruptedException {
        EsService esService = new EsService();

        List<String> list = new ArrayList<>();

        long start = System.currentTimeMillis();

        String items = esService.searchQueryItems("xxx");
        String guides = esService.searchQueryGuides("xxx");
        String applications = esService.getApplications("xxx");
        String appoints = esService.getAppointItems("xxx");

        list.add(items);
        list.add(guides);
        list.add(applications);
        list.add(appoints);

        long end = System.currentTimeMillis();

        System.out.println((end - start));
        System.out.println(list);
    }
}
